package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
public class Product extends BaseDomain{
    private static final long serialVersionUID = 1L;

	private String name; //商品名字

    private String sn;  //商品编码

    private BigDecimal costPrice;  //商品成本价

    private BigDecimal unitPrice; //商品单价

    private BigDecimal vipPrice; //商品会员价

    private String unit;  //商品单位

    private String commissionRatio; //商品提成

    private String remark;  //商品备注

    private String braCode;  // 商品条码

    @DateTimeFormat(pattern = "yyyy-MM-dd") //封装格式
    @JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8") //输出格式
    private Date expirationDate; //商品过期时间
    private  String brandName; //品牌

    private ProductCategory productCategory1;//关联表
    private  ProductCategory productCategory2; //二级分类

    private ProductStock productStock; //库存对象




}